
class FirstPublishModel {
  int? code;
  Data? data;
  String? message;
  String? requestNo;
  bool? successful;

  FirstPublishModel({this.code, this.data, this.message, this.requestNo, this.successful});

  FirstPublishModel.fromJson(Map<String, dynamic> json) {
    code = (json["code"] as num).toInt();
    data = json["data"] == null ? null : Data.fromJson(json["data"]);
    message = json["message"];
    requestNo = json["requestNo"];
    successful = json["successful"];
  }

  static List<FirstPublishModel> fromList(List<Map<String, dynamic>> list) {
    return list.map(FirstPublishModel.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["code"] = code;
    if(data != null) {
      _data["data"] = data?.toJson();
    }
    _data["message"] = message;
    _data["requestNo"] = requestNo;
    _data["successful"] = successful;
    return _data;
  }

  FirstPublishModel copyWith({
    int? code,
    Data? data,
    String? message,
    String? requestNo,
    bool? successful,
  }) => FirstPublishModel(
    code: code ?? this.code,
    data: data ?? this.data,
    message: message ?? this.message,
    requestNo: requestNo ?? this.requestNo,
    successful: successful ?? this.successful,
  );
}

class Data {
  List<ListItem>? list;
  int? pageNum;
  int? pageSize;
  int? total;
  int? totalPage;

  Data({this.list, this.pageNum, this.pageSize, this.total, this.totalPage});

  Data.fromJson(Map<String, dynamic> json) {
    list = json["list"] == null ? null : (json["list"] as List).map((e) => ListItem.fromJson(e)).toList();
    pageNum = (json["pageNum"] as num).toInt();
    pageSize = (json["pageSize"] as num).toInt();
    total = (json["total"] as num).toInt();
    totalPage = (json["totalPage"] as num).toInt();
  }

  static List<Data> fromList(List<Map<String, dynamic>> list) {
    return list.map(Data.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    if(list != null) {
      _data["list"] = list?.map((e) => e.toJson()).toList();
    }
    _data["pageNum"] = pageNum;
    _data["pageSize"] = pageSize;
    _data["total"] = total;
    _data["totalPage"] = totalPage;
    return _data;
  }

  Data copyWith({
    List<ListItem>? list,
    int? pageNum,
    int? pageSize,
    int? total,
    int? totalPage,
  }) => Data(
    list: list ?? this.list,
    pageNum: pageNum ?? this.pageNum,
    pageSize: pageSize ?? this.pageSize,
    total: total ?? this.total,
    totalPage: totalPage ?? this.totalPage,
  );
}

class ListItem {
  String? activityTag;
  String? coverImageUrl;
  String? daoHeadImageUrl;
  int? daoId;
  String? daoName;
  double? firstPublishPrice;
  String? id;
  String? productName;
  String? productType;
  int? showCount;
  int? sourceId;

  ListItem({this.activityTag, this.coverImageUrl, this.daoHeadImageUrl, this.daoId, this.daoName, this.firstPublishPrice, this.id, this.productName, this.productType, this.showCount, this.sourceId});

  ListItem.fromJson(Map<String, dynamic> json) {
    activityTag = json["activityTag"];
    coverImageUrl = json["coverImageUrl"];
    daoHeadImageUrl = json["daoHeadImageUrl"];
    daoId = (json["daoId"] as num).toInt();
    daoName = json["daoName"];
    firstPublishPrice = (json["firstPublishPrice"] as num).toDouble();
    id = json["id"];
    productName = json["productName"];
    productType = json["productType"];
    showCount = (json["showCount"] as num).toInt();
    sourceId = (json["sourceId"] as num).toInt();
  }

  static List<ListItem> fromList(List<Map<String, dynamic>> list) {
    return list.map(ListItem.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["activityTag"] = activityTag;
    _data["coverImageUrl"] = coverImageUrl;
    _data["daoHeadImageUrl"] = daoHeadImageUrl;
    _data["daoId"] = daoId;
    _data["daoName"] = daoName;
    _data["firstPublishPrice"] = firstPublishPrice;
    _data["id"] = id;
    _data["productName"] = productName;
    _data["productType"] = productType;
    _data["showCount"] = showCount;
    _data["sourceId"] = sourceId;
    return _data;
  }

  ListItem copyWith({
    String? activityTag,
    String? coverImageUrl,
    String? daoHeadImageUrl,
    int? daoId,
    String? daoName,
    double? firstPublishPrice,
    String? id,
    String? productName,
    String? productType,
    int? showCount,
    int? sourceId,
  }) => ListItem(
    activityTag: activityTag ?? this.activityTag,
    coverImageUrl: coverImageUrl ?? this.coverImageUrl,
    daoHeadImageUrl: daoHeadImageUrl ?? this.daoHeadImageUrl,
    daoId: daoId ?? this.daoId,
    daoName: daoName ?? this.daoName,
    firstPublishPrice: firstPublishPrice ?? this.firstPublishPrice,
    id: id ?? this.id,
    productName: productName ?? this.productName,
    productType: productType ?? this.productType,
    showCount: showCount ?? this.showCount,
    sourceId: sourceId ?? this.sourceId,
  );
}